﻿using System;
using System.Configuration;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace eCitizen.eAlerts.Constants
{
    public static class AppKeyConstants
    {
        private static string _houseKeepingFileLifeInMonths;
        private static string _sFTPFolderUrl;
        private static string _emailOutputReportFileFormat;
        private static string _smsOutputReportFileFormat;
        private static string _subscriberProfileReportFileFormat;
        private static string _subscriberProfileChecksumFileFormat;
        private static string _subscriberOutputReportFileFormat;
        private static string _subscriberOutputChecksumFileFormat;
        private static string _sendAlertErrorFileFormat;

        private static string _sFTPAgencyServerUrl;
        private static string _sFTPAgencyServerPort;
        private static string _sFTPAgencyServerUserName;
        private static string _sFTPAgencyServerPassword;
        private static string _sFTPAgencyPublicKeyFile;

        private static string _OneSmsAgencyServerUrl;
        private static string _OneSmsAgencyServerPort;
        private static string _OneSmsAgencyServerUserName;
        private static string _OneSmsAgencyServerPassword;
        private static string _OneSmsAgencyPublicKeyFile;

        public static string HouseKeepingFileLifeInMonths { get { return _houseKeepingFileLifeInMonths; } }
        public static string SftpFolderUrl { get { return _sFTPFolderUrl; } }
        public static string EmailOutputReportFileFormat { get { return _emailOutputReportFileFormat; } }
        public static string SmsOutputReportFileFormat { get { return _smsOutputReportFileFormat; } }
        public static string SubscriberProfileReportFileFormat { get { return _subscriberProfileReportFileFormat; } }
        public static string SubscriberProfileChecksumFileFormat { get { return _subscriberProfileChecksumFileFormat; } }
        public static string SubscriberOutputReportFileFormat { get { return _subscriberOutputReportFileFormat; } }
        public static string SubscriberOutputChecksumFileFormat { get { return _subscriberOutputChecksumFileFormat; } }
        public static string SendAlertErrorFileFormat { get { return _sendAlertErrorFileFormat; } }
        public static string SftpAgencyServerUrl { get { return _sFTPAgencyServerUrl; } }
        public static string SftpAgencyServerPort { get { return _sFTPAgencyServerPort; } }
        public static string SftpAgencyServerUserName { get { return _sFTPAgencyServerUserName; } }
        public static string SftpAgencyServerPassword { get { return _sFTPAgencyServerPassword; } }
        public static string SftpAgencyPublicKeyFile { get { return _sFTPAgencyPublicKeyFile; } }
        public static string OneSmsAgencyServerUrl { get { return _OneSmsAgencyServerUrl; } }
        public static string OneSmsAgencyServerPort { get { return _OneSmsAgencyServerPort; } }
        public static string OneSmsAgencyServerUserName { get { return _OneSmsAgencyServerUserName; } }
        public static string OneSmsAgencyServerPassword { get { return _OneSmsAgencyServerPassword; } }
        public static string OneSmsAgencyPublicKeyFile { get { return _OneSmsAgencyPublicKeyFile;  } }

        static AppKeyConstants()
        {
            LoadConfigurations();
        }

        private static void LoadConfigurations()
        {
            _houseKeepingFileLifeInMonths = ConfigurationManager.AppSettings["houseKeepingFileLifeInMonths"];
            _sFTPFolderUrl = ConfigurationManager.AppSettings["sFTPFolderUrl"];
            _emailOutputReportFileFormat = ConfigurationManager.AppSettings["emailOutputReportFileFormat"];
            _smsOutputReportFileFormat = ConfigurationManager.AppSettings["smsOutputReportFileFormat"];
            _subscriberProfileReportFileFormat = ConfigurationManager.AppSettings["subscriberProfileReportFileFormat"];
            _subscriberProfileChecksumFileFormat = ConfigurationManager.AppSettings["subscriberProfileChecksumFileFormat"];
            _subscriberOutputReportFileFormat = ConfigurationManager.AppSettings["subscriberOutputReportFileFormat"];
            _subscriberOutputChecksumFileFormat = ConfigurationManager.AppSettings["subscriberOutputChecksumFileFormat"];
            _sendAlertErrorFileFormat = ConfigurationManager.AppSettings["sendAlertErrorFileFormat"];

            _sFTPAgencyServerUrl = ConfigurationManager.AppSettings["sFTP.AgencyServerUrl"];
            _sFTPAgencyServerPort = ConfigurationManager.AppSettings["sFTP.AgencyServerPort"];
            _sFTPAgencyServerUserName = ConfigurationManager.AppSettings["sFTP.AgencyServerUserName"];
            _sFTPAgencyServerPassword = ConfigurationManager.AppSettings["sFTP.AgencyServerPassword"];
            _sFTPAgencyPublicKeyFile = ConfigurationManager.AppSettings["sFTP.AgencyPublicKeyFile"];
            

            _OneSmsAgencyServerUrl = ConfigurationManager.AppSettings["OneSms.AgencyServerUrl"];
            _OneSmsAgencyServerPort = ConfigurationManager.AppSettings["OneSms.AgencyServerPort"];
            _OneSmsAgencyServerUserName = ConfigurationManager.AppSettings["OneSms.AgencyServerUserName"];
            _OneSmsAgencyServerPassword = ConfigurationManager.AppSettings["OneSms.AgencyServerPassword"];
            _OneSmsAgencyPublicKeyFile = ConfigurationManager.AppSettings["OneSms.AgencyPublicKeyFile"];
                
        }
    }
}

